package beans;

import java.io.Serializable;

import java.util.Calendar;
import java.util.Date;

public class Information implements Serializable {
	

	private static final long serialVersionUID = -8081043390361258654L;
	
	protected Date date;
	protected Source train;
	protected Station station;
	protected Ligne ligne;
	protected int codeMessage;	
	
	public Information() {
		super();
		date=Calendar.getInstance().getTime();
		train=new Source(0);
		station=new Station(0);
		ligne=new Ligne(0);
	}

	public Source getTrain() {
		return train;
	}

	public void setTrain(Source train) {
		this.train = train;
	}

	public Station getStation() {
		return station;
	}

	public void setStation(Station station) {
		this.station = station;
	}

	public Ligne getLigne() {
		return ligne;
	}

	public void setLigne(Ligne ligne) {
		this.ligne = ligne;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	

	@Override
	public String toString() {
		return "Information [date=" + date + ", train=" + train + ", station="
				+ station + ", ligne=" + ligne + ", codeMessage=" + codeMessage
				+ "]";
	}

	public void setIdTrain(int id){
	//	System.out.println("iciiiii "+id);
		train.setId(id);
	}
	
	public void setIdStation(int id){
		station.setId(id);
	}

	public void setIdLigne(int id){
		ligne.setId(id);
	}

	public int getCodeMessage() {
		return codeMessage;
	}

	public void setCodeMessage(int codeMessage) {
		this.codeMessage = codeMessage;
	}
	
	
	
}
